package org.amphiprion.descenttool;

import org.amphiprion.descenttool.util.ApplicationConstants;
import org.amphiprion.descenttool.util.DeviceUtil;
import org.amphiprion.descenttool.util.PreferenceUtil;
import org.amphiprion.descenttool.util.PreferenceUtil.Preference;

import android.app.Application;
import android.content.SharedPreferences;

public class DescentApplication extends Application {
	@Override
	public void onCreate() {
		super.onCreate();

		SharedPreferences pref = getSharedPreferences(ApplicationConstants.GLOBAL_PREFERENCE, 0);
		PreferenceUtil.init(pref);
		DeviceUtil.init(this);
		DeviceUtil.disableVibration(PreferenceUtil.getBoolean(Preference.DISABLE_VIBRATION, false));

	}
}
